* STATA Do file for Chapter 7, Mark R. Beissinger, The Revolutionary City  
version 14
clear all
set more off
log using Logfiles\chapter7.log, replace
* ============================================================================
* STATISTICAL RESULTS APPEARING IN CHAPTER 7
* STATA Do file for Chapter 7  
* Results reported in Chapter 7  
* Author: Mark R. Beissinger  
* Date:  January 2022  
* Princeton, NJ 
* =============================================================================
* BEFORE RUNNING, YOU MUST SET THE DEFAULT PATH FOR WHERE THE DATA
*   FILES RESIDE
* =============================================================================
* Before running, you must download the following package for STATA for running 
*  Brant tests (the brant command within the following package):
*    spost13_ado from https://jslsoc.sitehost.iu.edu/stata
* =============================================================================
* The following datafiles are used in this chapter:
*   Monitoring surveys (Ukraine)--monitoring20052014engmerged.dta
*   KIIS survey (Ukraine)--mohyla.orangerev.dta
*   2011 Arab Barometer--Tunisia and Egypt--fullarabbarom2.dta
*   Cross-sectional data on revolutionary episodes--revolutionaryeps.dta
*   NOTE: The Gallup and Doherty/Schraeder data cited in this chapter are not 
*      available for replication purposes; readers interested in these data 
*      must consult the Gallup Organization and Doherty/Schraeder directly
* =============================================================================
* Output produced:  Logfiles\chapter7.log
* =============================================================================


* ====================
* DATA FOR FIGURE 7.1
* ====================
use monitoring20052014engmerged.dta
tab partic6 if EVA_vers=="yr2005", m
tab partic6 if EVA_vers=="yr2014", m

* ====================
* DATA FOR FIGURE 7.2
* ====================
clear
use fullarabbarom2.dta
tab egpartic6 if country==2, m
tab tpartic5 if country==10, m

* =================================================================
* PREFERENCE FALSIFICATION: COMPARISON OF MONITORING AND KIIS DATA
* =================================================================
clear
use mohyla.orangerev.dta
tab demopartvote, m
* Comparison of whether supporters knew friends or relatives who participated
tab demopartvote v24, row

* ============================================================================
* PREFERENCE FALSIFICATION: ANTI-MAIDAN SUPPORT, REFUSAL TO ANSWER, BY REGION
* ============================================================================
clear
use monitoring20052014engmerged.dta
tab EVA310C donbas if EVA_vers=="yr2014", col
logit antimaidnoanswer west eastnodon south donbas if EVA_vers=="yr2014", or

* =====================================================================
* DEGREE OF COMMITMENT TO DEFENDING THEIR VOTE AMONG REGIME SUPPORTERS 
*   AND OPPOSITION SUPPORTERS, ORANGE REVOLUTION
* =====================================================================
clear
use mohyla.orangerev.dta
tab votefor defendchoice, chi row

* ===============================================================
* ILLUSTRATIONS OF WHAT ONE CAN LEARN--INITIAL FIGURES PRESENTED
*   ON ORANGE REVOLUTION PARTICIPANTS
* ===============================================================
clear
use monitoring20052014engmerged.dta
* PARTICIPANTS VS. OTHERS
* Living space
ttest EVA242 if EVA_vers=="yr2005", by(newpartica)

* Heating of home in winter
ologit EVA247 gender newage newpartica if EVA_vers=="yr2005", or
brant
* Passed proportional odds test
margins, atmeans at(newpartica=(0 1))

* Attends church
logit attendschurch gender newage newpartica if EVA_vers=="yr2005", or 
margins, atmeans at(newpartica=(0 1))

* Smoker
logit smoker gender newage newpartica if EVA_vers=="yr2005", or 
margins, atmeans at(newpartica=(0 1))

* True friends
ologit newtruefriends gender newage newpartica if EVA_vers=="yr2005", or 
brant
* Passed proportional odds test
margins, atmeans at(newpartica=(0 1))

* Loneliness
ologit EVA185 gender newage newpartica if EVA_vers=="yr2005", or 
margins, atmeans at(newpartica=(0 1))
brant
* failed Brant test--alternative results using mlogit
mlogit EVA185 gender newage newpartica if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at(newpartica=(0 1))

* Satisfied with life as a whole
ologit EVA130  gender newage newpartica if EVA_vers=="yr2005", or 
brant
* Passed proportional odds test
margins, atmeans at(newpartica=(0 1))

* Remained politically active after revolution
logit EVA223_14 gender newage newpartica if EVA_vers=="yr2005", or 
margins, atmeans at(newpartica=(0 1))

* BIOGRAPHICAL AVAILABILITY
* Marriage for Orange and Euromaidan participants, vs. other rev supporters
logit married  gender newage newpartica if EVA_vers=="yr2005" & partic5a~=4 & partic5a~=5, or
logit married  gender newage newpartica if EVA_vers=="yr2014" & partic5a~=4 & partic5a~=5, or

* Children under 6 for Orange and Euromaidan participants, vs. other rev supporters
logit EVA264_2 gender newage newpartica if EVA_vers=="yr2005" & partic5a~=4 & partic5a~=5, or
logit EVA264_2 gender newage newpartica if EVA_vers=="yr2014" & partic5a~=4 & partic5a~=5, or

* Health for Orange and Euromaidan participants, vs. other rev supporters
ologit health gender newage newpartica if EVA_vers=="yr2005" & partic5a~=4 & partic5a~=5, or
brant
* Passed proportional odds test
ologit health gender newage newpartica if EVA_vers=="yr2014" & partic5a~=4 & partic5a~=5, or
brant
* Passed proportional odds test

* APATHETIC IN ORANGE REVOLUTION
logit apathetic gender newage  EVA251 russpeakathome  if EVA_vers=="yr2005", or

* COUNTER-REVOLUTIONARIES IN ORANGE REVOLUTION
*  Exercise
logit exercise newage gender oppcounter if EVA_vers=="yr2005", or
margins, atmeans at(oppcounter=(0 1))
logit exercise newage gender countermob if EVA_vers=="yr2005", or
margins, atmeans at(countermob=(0 1))

* Visited lawyer in last 12 mos.
logit visitedlawyer  oppcounter if EVA_vers=="yr2005", or
margins, atmeans at(oppcounter=(0 1))
logit visitedlawyer  countermob if EVA_vers=="yr2005", or
margins, atmeans at(countermob=(0 1))

* Dissatisfaction w. amenities and sanitary conditions in home
ologit homedissat newage gender oppcounter if EVA_vers=="yr2005", or
brant
* Passed proportional odds test
margins, atmeans at(oppcounter=(0 1))
ologit homedissat newage gender countermob if EVA_vers=="yr2005", or
brant
* Passed proportional odds test
margins, atmeans at(countermob=(0 1))

* Drinking habits
tab newdrinker oppcounter if EVA_vers=="yr2005", col chi
tab newdrinker countermob if EVA_vers=="yr2005" & partic6~=5, col chi

* From Donbas
logit donbas oppcounter if EVA_vers=="yr2005", or
margins, atmeans at(oppcounter=(0 1))
logit donbas countermob if EVA_vers=="yr2005", or
margins, atmeans at(countermob=(0 1))

* From Donbas--KIIS sample
clear
use mohyla.orangerev.dta
logit donbas age gender i.demopartvote , or
margins, atmeans at(demopartvote=(4 5))

* REVOLUTIONARY HELPERS IN ORANGE REVOLUTION
clear
use monitoring20052014engmerged.dta
logit EVA250_3  gender newage ib(3).partic5a if EVA_vers=="yr2005", or
margins, atmeans at(partic5a=(1 2 3 4 5))
ttest newage if EVA_vers=="yr2005", by(particoraid)

* EGYPTIAN REVOLUTION
clear
use fullarabbarom2.dta
* Egypt--social structural basis for support or opposition to revolution
logit opposerev gender newage  edlvl religscale christian farmer if country==2, or

* Those who aided revolutionaries had friends who participated
tab frpart egpartic5 if country==2 & egpartic5~=1 & egpartic5~=4 & egpartic5~=5, col chi


* =============================================================
* DATA FOR FIGURE 7.3: GENDER DIFFERENCES, CONTROLLING FOR AGE
* =============================================================
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
* Orange Revolution
* By gender
mlogit partic5a gender newage if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at(gender=(0 1))
* Average probability for all
tab partic5a if EVA_vers=="yr2005" & e(sample)
* Euromaidan
* By gender
mlogit partic5a gender newage if EVA_vers=="yr2014", rrr b(3)
margins, atmeans at(gender=(0 1))
* Average probability for all
tab partic5a if EVA_vers=="yr2014" & e(sample)
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
* Egyptian Revolution
* By gender
mlogit egpartic5 gender newage if country==2 [pw=WT], rrr b(3)
margins, atmeans at(gender=(0 1))
* Average probability for all
tab egpartic5 if country==2 & e(sample)
* Tunisian Revolution
* By gender
mlogit tpartic4 gender newage if country==10 [pw=WT], rrr b(2)
margins, atmeans at(gender=(0 1))
* Average probability for all
tab tpartic4 if country==10 & e(sample)
* Participation by Egyptian housewives
tab housewife egrevpart if country==2, col

* =============================================================
* DATA FOR FIGURE 7.4: AGE DIFFERENCES, CONTROLLING FOR GENDER
* =============================================================
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
* Orange Revolution
* By age
mlogit partic5a gender agecat if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at(agecat=(1 2 3 4 5 6))
* Average probability for all
tab partic5a  if EVA_vers=="yr2005" & e(sample)
* Euromaidan
* By age
mlogit partic5a gender agecat if EVA_vers=="yr2014", rrr b(3)
margins, atmeans at(agecat=(1 2 3 4 5 6))
tab partic5a  if EVA_vers=="yr2014" & e(sample)
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
* Egyptian Revolution
* By age
mlogit egpartic5 gender newagelvl if country==2 [pw=WT], rrr b(3)
margins, atmeans at(newagelvl=(1 2 3 4 5 6))
* Average probability for all
tab egpartic5 if country==2 & e(sample)
* Tunisian Revolution
* By age
mlogit tpartic4 gender newagelvl if country==10 [pw=WT], rrr b(2)
margins, atmeans at(newagelvl=(1 2 3 4 5 6))
* Average probability for all
tab tpartic4 if country==10 & e(sample)
* Rural vs. urban youth in Egyptian revolution
tab newagelvl egpartic5 if country==2 & urban==0, row
tab newagelvl egpartic5 if country==2 & urban==1, row

* =====================================================
* DATA FOR FIGURE 7.5: OCCUPATION OF REV PARTICIPANTS
* =====================================================
* Ukrainian revolutions
* Figure 7.5
clear
use monitoring20052014engmerged.dta
tab EVA266 partic5a if EVA_vers=="yr2005", col m
tab EVA266 partic5a if EVA_vers=="yr2014", col m
* Statistical overrepresentation of groups
* Orange
logit newpartica 5.EVA266 if EVA_vers=="yr2005", nolog or
logit newpartica 10.EVA266  if EVA_vers=="yr2005", nolog or
logit newpartica 14.EVA266  if EVA_vers=="yr2005", nolog or
* Euromaidan
logit newpartica 4.EVA266  if EVA_vers=="yr2014", nolog or
logit newpartica 5.EVA266  if EVA_vers=="yr2014", nolog or
logit newpartica 8.EVA266  if EVA_vers=="yr2014", nolog or
logit newpartica 10.EVA266  if EVA_vers=="yr2014", nolog or
*
* Egyptian and Tunisian revolutions
* Fiture 7.5
clear
use fullarabbarom2.dta
tab occdisag egpartic5 if country==2, col m
tab occdisag tpartic4 if country==10, col m
* Statistical overrepresentation of groups
* Tunisia
logit participate 13.occdisag if country==10 [pw=WT], nolog or
logit participate 8.occdisag if country==10 [pw=WT], nolog or
logit participate 1.occdisag if country==10 [pw=WT], nolog or
logit participate 10.occdisag if country==10 [pw=WT], nolog or
logit participate 14.occdisag if country==10 [pw=WT], nolog or
mlogit tpartic4 14.occdisag if country==10 [pw=WT], nolog rrr
* Egypt
logit participate 8.occdisag if country==2 [pw=WT], nolog or
logit participate 3.occdisag if country==2 [pw=WT], nolog or

* ======================================================================
* DATA FOR FIGURE 7.6: INCOME QUINTILES, CONTROLLING FOR GENDER AND AGE
* ======================================================================
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
* Orange Revolution
* By income quintiles
mlogit partic5a gender newage incomequint if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at (incomequint=(1 2 3 4 5))
* Average probability for all
margins, atmeans
* Euromaidan
* By income quintiles
mlogit partic5a gender newage incomequint if EVA_vers=="yr2014", rrr b(3)
margins, atmeans at(incomequint=(1 2 3 4 5))
* Average probability for all
margins, atmeans
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
* Egyptian Revolution
* By income quintiles
mlogit egpartic5 gender newage incomequintile if country==2 [pw=WT], rrr b(3)
margins, atmeans at(incomequintile=(1 2 3 4 5))
* Average probability for all
margins, atmeans
* Tunisian Revolution
* By income quintiles
mlogit tpartic4 gender newage incomequintile if country==10 [pw=WT], rrr b(2)
margins, atmeans at(incomequintile=(1 2 3 4 5))
* Average probability for all
margins, atmeans

* ===============================================================
* DATA FOR FIGURE 7.7: CONSUMER GOODS OWNERSHIP, CONTROLLING FOR 
*   GENDER AND AGE (UKRAINE ONLY)
* ===============================================================
clear
use monitoring20052014engmerged.dta
* Orange Revolution
* Number of consumer goods owned
mlogit partic5a gender newage consumergoods if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at (consumergoods=(1 2 3 4 5 6 7 8 9 10))
* Average probability for all
margins, atmeans
* Euromaidan
* Number of consumer goods owned
mlogit partic5a gender newage consumergoods if EVA_vers=="yr2014", rrr b(3)
margins, atmeans at(consumergoods=(1 2 3 4 5 6 7 8 9 10))
* Average probability for all
margins, atmeans

* ======================================================================
* DATA FOR FIGURE 7.8: EDUCATION LEVELS, CONTROLLING FOR GENDER AND AGE
* ======================================================================
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
* Orange Revolution
* Educational levels
mlogit partic5a gender newage edulevel3 if EVA_vers=="yr2005", rrr b(3)
margins, atmeans at (edulevel3=(1 2 3))
* Average probability for all
tab partic5a if e(sample)
* Euromaidan
* Educational levels
mlogit partic5a gender newage edulevel3 if EVA_vers=="yr2014", rrr b(3)
margins, atmeans at(edulevel3=(1 2 3))
* Average probability for all
tab partic5a if e(sample)
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
* Egyptian Revolution
* Educational levels
mlogit egpartic5 gender newage edulvl3 if country==2 [pw=WT], rrr b(3)
margins, atmeans at(edulvl3=(1 2 3))
* Average probability for all
tab egpartic5 if e(sample)
* Tunisian Revolution
* Educational levels
mlogit tpartic4 gender newage edulvl3 if country==10 [pw=WT], rrr b(2)
margins, atmeans at(edulvl3=(1 2 3))
* Average probability for all
tab tpartic4 if e(sample)
* Higher education and unemployment (Arab Spring only)
* Note:  not all in survey were in labor market
* Egyptian Revolution
mlogit egpartic5 highered unemployed employed if country==2 [pw=WT], rrr b(3)
margins, atmeans at(highered=1 unemployed=1 employed=0)
margins, atmeans at(highered=1 unemployed=0 employed=1)
margins, atmeans at(highered=0 unemployed=1 employed=0)
* Tunisian Revolution
mlogit tpartic4 highered unemployed employed if country==10 [pw=WT], rrr b(2)
margins, atmeans at(highered=1 unemployed=1 employed=0)
margins, atmeans at(highered=1 unemployed=0 employed=1)
margins, atmeans at(highered=0 unemployed=1 employed=0)

* ============================================================
* PARTICIPATION, SUPPORT, OPPOSITION BY REGION (UKRAINE ONLY)
* ============================================================
clear
use monitoring20052014engmerged.dta
mlogit partic5a  gender newage edulevel consumergoods west center south  if EVA_vers=="yr2005", rrr
margins, atmeans at(west=1 center=0 south=0)
margins, atmeans at(west=0 center=1 south=0)
margins, atmeans at(west=0 center=0 south=1)
margins, atmeans at(west=0 center=0 south=0)
mlogit partic5a  gender newage edulevel consumergoods west center south  if EVA_vers=="yr2014", rrr
margins, atmeans at(west=1 center=0 south=0)
margins, atmeans at(west=0 center=1 south=0)
margins, atmeans at(west=0 center=0 south=1)
margins, atmeans at(west=0 center=0 south=0)

* ========================================================================
* DATA FOR FIGURE 7.9: PARTICIPATION, SUPPORT, OPPOSITION BY LANGUAGE USE 
*   AT HOME (UKRAINE ONLY)
* ========================================================================
clear
use monitoring20052014engmerged.dta
mlogit partic5a  gender newage edulevel consumergoods ukrspeakathome  if EVA_vers=="yr2005", rrr
margins, atmeans at(ukrspeakathome=(0 1))
mlogit partic5a  gender newage edulevel consumergoods ukrspeakathome  if EVA_vers=="yr2014", rrr
margins, atmeans at(ukrspeakathome=(0 1))

* ====================================================
* VARIOUS IDENTITY FEATURES OF UKRAINIAN PARTICIPANTS
* ====================================================
clear
use monitoring20052014engmerged.dta
* Proportion speaking primarily Ukrainian at home
tab ukrspeakathome partic5a if EVA_vers=="yr2014", col 
tab ukrspeakathome partic5a if EVA_vers=="yr2005", col 
* Uniate
tab uniate partic5a if EVA_vers=="yr2005", col 
tab uniate partic5a if EVA_vers=="yr2014", col 
* Identifies primarily as citizen of Ukraine
tab ukrcitizen partic5a if EVA_vers=="yr2005", col 
tab ukrcitizen partic5a if EVA_vers=="yr2014", col 
* Proud to be Ukrainian citizen
tab ukrproud partic5a if EVA_vers=="yr2005", col
tab ukrproud partic5a if EVA_vers=="yr2014", col
* Foreign orientation
tab fororientation5 partic5a if EVA_vers=="yr2005", col
tab fororientation5 partic5a if EVA_vers=="yr2014", col

* =====================================================
* DATA FOR FIGURE 7.10: RELIGIOUS PRACTICE IN TUNISIAN 
*   AND EGYPTIANS REVOLUTIONS
* =====================================================
clear
use fullarabbarom2.dta
mlogit egpartic5 gender newage  religscale christian if country==2 [pw=WT], rrr b(3)
margins, atmeans at(christian=0 religscale=(0 3 6 9 12 15))
margins, atmeans at(christian=(0 1))
mlogit tpartic4 gender newage  religscale if country==10 [pw=WT], rrr b(2)
margins, atmeans at(religscale=(0 3 6 9 12 15))

* =====================================
* TRUSTS MUSLIM BROTHERHOOD OR ENNAHDA
* =====================================
clear
use fullarabbarom2.dta
tab q20112 egpartic5 if country==2, col
tab q20114 tpartic4 if country==10, col

* =============================================================================
* BLOC RECRUITMENT IN ORANGE REV--VOTE OF PARTICIPANT INFLUENCED BY POLITICIAN
* =============================================================================
clear
use monitoring20052014engmerged.dta
tab EVA307_1 partic5a if EVA_vers=="yr2005", col
tab EVA307_2 partic5a if EVA_vers=="yr2005", col
tab EVA307_3 partic5a if EVA_vers=="yr2005", col

* ==================================================================
* DATA FOR FIGURE 7.11: POL SELF-ID AMONG PARTICIPANTS, SUPPORTERS, 
*   OPPONENTS (UKRAINE ONLY)
* ==================================================================
* Note:  Herfindahl indices calculated by hand
clear
use monitoring20052014engmerged.dta
tab EVA13 partic5a if EVA_vers=="yr2005", col
tab EVA13 partic5a if EVA_vers=="yr2014", col

* ==========================================================
* REASONS PARTICIPANTS GAVE FOR PARTICIPATION--TUNISIAN AND 
*   EGYPTIAN REVOLUTIONS
* ==========================================================
clear
use fullarabbarom2.dta
tab eg8091 egpartic5 if country==2, col
tab eg8092 egpartic5 if country==2, col
tab t9091 tpartic4 if country==10, col
tab t9092 tpartic4 if country==10, col

* ===========================================================================
* REASONS PARTICIPANTS GAVE FOR PARTICIPATION--UKRAINE:  KIIS AND MONITORING
* ===========================================================================
clear
use mohyla.orangerev.dta
tab v22_1 demopartvote, col
tab v22_2 demopartvote, col
tab v22_3 demopartvote, col
tab v22_4 demopartvote, col
tab v22_5 demopartvote, col
tab v22_6 demopartvote, col
tab v22_7 demopartvote, col
tab v22_8 demopartvote, col
tab v22_9 demopartvote, col
tab v22_10 demopartvote, col
tab v22_11 demopartvote, col
clear
use monitoring20052014engmerged.dta
tab EVA317_1 partic5 if EVA_vers=="yr2005", col
tab EVA317_2 partic5 if EVA_vers=="yr2005", col
tab EVA317_3 partic5 if EVA_vers=="yr2005", col
tab EVA317_4 partic5 if EVA_vers=="yr2005", col
tab EVA317_5 partic5 if EVA_vers=="yr2005", col
tab EVA317_6 partic5 if EVA_vers=="yr2005", col
tab EVA317_7 partic5 if EVA_vers=="yr2005", col
tab EVA317_8 partic5 if EVA_vers=="yr2005", col
tab EVA317_9 partic5 if EVA_vers=="yr2005", col
tab EVA317_10 partic5 if EVA_vers=="yr2005", col
tab EVA317_11 partic5 if EVA_vers=="yr2005", col

* ================================================
* FIGURE 7.12:  CLUSTER PROFILES OF PARTICIPANTS
* ================================================
* Figure 7.12 calculated using Latent Gold 4.5.0--separate analysis

* ========================================================
* ATTITUDES TOWARD DEMOCRACY AMONG PARTICIPANTS:  UKRAINE
* ========================================================
clear
use monitoring20052014engmerged.dta
* Leaders vs. laws
tab leadersvslaws newpartica if EVA_vers=="yr2005", col
tab leadersvslaws newpartica if EVA_vers=="yr2014", col
* Ukraine needs a multi-party system
tab multiparty newpartica if EVA_vers=="yr2005", col
tab multiparty newpartica if EVA_vers=="yr2014", col
* Gypsies as inhabitants of Ukraine
tab EVA120_1 newpartica if EVA_vers=="yr2005", col
tab EVA120_2 newpartica if EVA_vers=="yr2005", col
tab EVA120_3 newpartica if EVA_vers=="yr2005", col
tab EVA120_4 newpartica if EVA_vers=="yr2005", col
tab EVA120_5 newpartica if EVA_vers=="yr2005", col
tab EVA120_6 newpartica if EVA_vers=="yr2005", col
tab EVA120_7 newpartica if EVA_vers=="yr2005", col
tab EVA120 newpartica if EVA_vers=="yr2014", col
* Jews as inhabitants of Ukraine
tab EVA107_1 newpartica if EVA_vers=="yr2005", col
tab EVA107_2 newpartica if EVA_vers=="yr2005", col
tab EVA107_3 newpartica if EVA_vers=="yr2005", col
tab EVA107_4 newpartica if EVA_vers=="yr2005", col
tab EVA107_5 newpartica if EVA_vers=="yr2005", col
tab EVA107_6 newpartica if EVA_vers=="yr2005", col
tab EVA107_7 newpartica if EVA_vers=="yr2005", col
tab EVA107 newpartica if EVA_vers=="yr2014", col

* =========================================
* MEMBERSHIP IN CIVIL SOCIETY ASSOCIATIONS
* =========================================
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
tab civsoc newpartica if EVA_vers=="yr2005", col
tab civsoc newpartica if EVA_vers=="yr2014", col
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
tab membany egrevpart if country==2, col
tab membany trevpart if country==10, col

* ==============================================
* GROWTH OF DIGITAL TECHNOLOGIES IN REVOLUTIONS
* ==============================================
clear
use revolutionaryeps.dta
* Urban civic vs. other revs since 1994
logit socialmediaused startyear urbancivic if startyear>1993, or
margins, atmeans at(urbancivic=(0 1))
* Media use in urban civic revs since 1994
tab newspaperused urbancivic if startyear<1994, col
tab radioused urbancivic if startyear<1994, col
tab televisused urbancivic if startyear<1994, col
tab socialmediaused urbancivic if startyear>1993, col
tab newspaperused urbancivic if startyear>1993, col
tab radioused urbancivic if startyear>1993, col
tab televisused urbancivic if startyear>1993, col

* ====================================================
* DIGITAL COMMUNICATIONS USAGE AMONG REV PARTICIPANTS
* ====================================================
* Ukrainian revolutions--internet and mobile phone usage among participants
clear
use monitoring20052014engmerged.dta
tab internet newpartica if EVA_vers=="yr2005", col
tab internet newpartica if EVA_vers=="yr2014", col
tab mobilephone newpartica if EVA_vers=="yr2005", col
tab mobilephone newpartica if EVA_vers=="yr2014", col
tab digitaluser newpartica if EVA_vers=="yr2005", col
tab digitaluser newpartica if EVA_vers=="yr2014", col
* Egyptian and Tunisian revolutions--internet and mobile phone usage among participants
clear
use fullarabbarom2.dta
tab newinternet egrevpart if country==2, col
tab newinternet trevpart if country==10, col

* ====================================================
* CIVIL SOCIETY ASSOCIATION MEMBERS & INTERNET USAGE 
*   AMONG PARTICIPANTS
* ===================================================+
* Ukrainian revolutions
clear
use monitoring20052014engmerged.dta
tab civsoc internet if EVA_vers=="yr2005" & newpartica==1
tab civsoc internet if EVA_vers=="yr2014" & newpartica==1
* Egyptian and Tunisian revolutions
clear
use fullarabbarom2.dta
tab membany newinternet if country==2 & egrevpart==1, col
tab membany newinternet if country==10 & trevpart==1, col 

* =====================================================
* ROLE OF CHURCH ATTENDANCE AMONG UNIATES IN FOSTERING 
*   PARTICIPATION--EUROMAIDAN
* =====================================================
clear
use monitoring20052014engmerged.dta
logit newpartica gender newage i.uniate##i.attendschurch if EVA_vers=="yr2014", or
margins i.uniate#attendschurch, atmeans

* =====================================
* FACEBOOK USAGE AMONG YOUNG TUNISIANS
* =====================================
clear
use fullarabbarom2.dta
tab te4113  if country==10 & newage<=25, m
tab te4113  if country==10 & newage>25, m

* =====================================================
* USE OF INTERNET, TV BY PARTICIPANTS TO FOLLOW EVENTS 
*   OF REVOLUTION (TUNISIA AND EGYPT)
* =====================================================
clear
use fullarabbarom2.dta
tab eg807 egrevpart if country==2, col
tab t907 trevpart if country==10, col

* ==================================================
* INTERNET USAGE AND PARTICIPATION W. FRIENDS AMONG 
*   PARTICIPANTS (TUNISIA AND EGYPT)
* ==================================================
clear
use fullarabbarom2.dta
tab frpart egrevpart, col
tab frpart trevpart , col
tab frpart intnetinrev if egpartic5==1, col chi 
tab frpart intnetinrev if tpartic4==1, col chi 

* ==============================================
* FIGURE 7.13:  STRONG TIES AND USE OF INTERNET 
*   DURING REVOLUTIONS--ARAB REVS ONLY
* ==============================================
* Egypt
mlogit egpartic5 gender c.newage##c.newage  frpart intnetinrev  if country==2, rrr
margins, atmeans at(frpart=(0 1) intnetinrev=(0 1))
* Tunisia
mlogit tpartic4 gender newage  frpart intnetinrev  if country==10, rrr
margins, atmeans at(frpart=(0 1) intnetinrev=(0 1))

* =======================================================================
* INTERNET USAGE AND CONSISTENCY OF PARTICIPATION IN EGYPTIAN REVOLUTION
* =======================================================================
clear
use fullarabbarom2.dta
poisson etotaldemos intnetinrev if country==2, irr
margins, at(intnetinrev=(0 1))


log close

clear
